home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / osi / isode / vmsisode / vmsisode80_tar.Z / vmsisode80_tar / sockit / gccinclude / fab.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-04-24  |  8.5 KB  |  194 lines

  1. /*    FAB - File Access Block Definitions    */
  2.  
  3. struct    FAB    {
  4.        unsigned char    fab$b_bid;            /* block identification */
  5. #define            FAB$C_BID    3        /* block id constant */
  6.  
  7.        unsigned char    fab$b_bln;            /* block length */
  8. #define            FAB$C_BLN    0x050        /* block length constant (80 bytes) */
  9. #define            FAB$K_BLN    0x050
  10.  
  11.        unsigned short    fab$w_ifi;                /* internal file identifier */
  12. #define            FAB$V_PPF_RAT    6            /* rat value for process-permanent files */
  13. #define            FAB$S_PPF_RAT    8
  14. #define            FAB$M_PPF_RAT    (0x0ff << FAB$V_PPF_RAT)
  15. #define            FAB$V_PPF_IND    14            /* indirect access to process-permanent file */
  16. #define            FAB$M_PPF_IND    (1 << FAB$V_PPF_IND)
  17.  
  18.        unsigned int    fab$l_fop;            /* file options */
  19. #define            FAB$V_MXV    1        /* maximize version number */
  20. #define            FAB$M_MXV    (1 << FAB$V_MXV)
  21. #define            FAB$V_SUP    2        /* supersede existing file */
  22. #define            FAB$M_SUP    (1 << FAB$V_SUP)
  23. #define            FAB$V_TMP    3        /* create temporary file */
  24. #define            FAB$M_TMP    (1 << FAB$V_TMP)
  25. #define            FAB$V_TMD    4        /* temporary file marked for delete */
  26. #define            FAB$M_TMD    (1 << FAB$V_TMD)
  27. #define            FAB$V_DFW    5        /* deferred write (rel and idx) */
  28. #define            FAB$M_DFW    (1 << FAB$V_DFW)
  29. #define            FAB$V_SQO    6        /* sequential access only */
  30. #define            FAB$M_SQO    (1 << FAB$V_SQO)
  31. #define            FAB$V_RWO    7        /* rewind magnetic tape on open */
  32. #define            FAB$M_RWO    (1 << FAB$V_RWO)
  33. #define            FAB$V_POS    8        /* use next magnetic tape position */
  34. #define            FAB$M_POS    (1 << FAB$V_POS)
  35. #define            FAB$V_WCK    9        /* write checking */
  36. #define            FAB$M_WCK    (1 << FAB$V_WCK)
  37. #define            FAB$V_NEF    10        /* not end of file, inihibit eof positioning */
  38. #define            FAB$M_NEF    (1 << FAB$V_NEF)
  39. #define            FAB$V_RWC    11        /* rewind magnetic tape on close */
  40. #define            FAB$M_RWC    (1 << FAB$V_RWC)
  41. #define            FAB$V_DMO    12        /* dismount mt on close (not implemented) */
  42. #define            FAB$M_DMO    (1 << FAB$V_DMO)
  43. #define            FAB$V_SPL    13        /* spool file on close */
  44. #define            FAB$M_SPL    (1 << FAB$V_SPL)
  45. #define            FAB$V_SCF    14        /* submit command file on close */
  46. #define            FAB$M_SCF    (1 << FAB$V_SCF)
  47. #define            FAB$V_DLT    15        /* delete file */
  48. #define            FAB$M_DLT    (1 << FAB$V_DLT)
  49. #define            FAB$V_NFS    16        /* non-file-structured operation */
  50. #define            FAB$M_NFS    (1 << FAB$V_NFS)
  51. #define            FAB$V_UFO    17        /* user file open - no rms operation */
  52. #define            FAB$M_UFO    (1 << FAB$V_UFO)
  53. #define            FAB$V_PPF    18        /* process permanent file (pio segment) */
  54. #define            FAB$M_PPF    (1 << FAB$V_PPF)
  55. #define            FAB$V_INP    19        /* process permanent file is 'input' */
  56. #define            FAB$M_INP    (1 << FAB$V_INP)
  57. #define            FAB$V_CTG    20        /* contiguous extension */
  58. #define            FAB$M_CTG    (1 << FAB$V_CTG)
  59. #define            FAB$V_CBT    21        /* contiguous best try */
  60. #define            FAB$M_CBT    (1 << FAB$V_CBT)
  61. #define            FAB$V_JNL    22        /* explicit logging (not implemented) */
  62. #define            FAB$M_JNL    (1 << FAB$V_JNL)
  63. #define            FAB$V_RCK    23        /* read checking */
  64. #define            FAB$M_RCK    (1 << FAB$V_RCK)
  65. #define            FAB$V_NAM    24        /* use NAM block device, file and/or directory id */
  66. #define            FAB$M_NAM    (1 << FAB$V_NAM)
  67. #define            FAB$V_CIF    25        /* create if non-existent */
  68. #define            FAB$M_CIF    (1 << FAB$V_CIF)
  69. #define            FAB$V_UFM    26        /* user file open mode (user if 1, super if 0)
  70.                                enable only if esc and (ufo or nfs) are also on */
  71. #define            FAB$M_UFM    (1 << FAB$V_UFM)
  72. #define            FAB$V_ESC    27        /* 'escape' to non-standard functions ($modify) */
  73. #define            FAB$M_ESC    (1 << FAB$V_ESC)
  74. #define            FAB$V_TEF    28        /* truncate at end-of-file on close (write-accessed seq.
  75.                                disk file only) */
  76. #define            FAB$M_TEF    (1 << FAB$V_TEF)
  77. #define            FAB$V_OFP    29        /* output file parse (only name type sticky) */
  78. #define            FAB$M_OFP    (1 << FAB$V_OFP)
  79. #define            FAB$V_KFO    30        /* known file open (image activator only release 1) */
  80. #define            FAB$M_KFO    (1 << FAB$V_KFO)
  81.  
  82.        unsigned int    fab$l_sts;            /* status */
  83.        unsigned int    fab$l_stv;            /* status value */
  84.        unsigned int    fab$l_alq;            /* allocation quantity */
  85.        unsigned short    fab$w_deq;            /* default allocation quantity */
  86.  
  87.        unsigned char    fab$b_fac;            /* file access */
  88. #define            FAB$V_PUT    0        /* put access */
  89. #define            FAB$M_PUT    (1 << FAB$V_PUT)
  90. #define            FAB$V_GET    1        /* get access */
  91. #define            FAB$M_GET    (1 << FAB$V_GET)
  92. #define            FAB$V_DEL    2        /* delete access */
  93. #define            FAB$M_DEL    (1 << FAB$V_DEL)
  94. #define            FAB$V_UPD    3        /* update access */
  95. #define            FAB$M_UPD    (1 << FAB$V_UPD)
  96. #define            FAB$V_TRN    4        /* truncate access */
  97. #define            FAB$M_TRN    (1 << FAB$V_TRN)
  98. #define            FAB$V_BIO    5        /* block i/o access */
  99. #define            FAB$M_BIO    (1 << FAB$V_BIO)
  100. #define            FAB$V_BRO    6        /* block and record i/o access */
  101. #define            FAB$M_BRO    (1 << FAB$V_BRO)
  102. #define            FAB$V_EXE    7        /* execute access (caller must be exec or kernel mode,
  103.                                ufo must also be set) */
  104. #define            FAB$M_EXE    (1 << FAB$V_EXE)
  105.  
  106.        unsigned char    fab$b_shr;                /* file sharing */
  107. #define            FAB$V_SHRPUT    0            /* put access */
  108. #define            FAB$M_SHRPUT    (1 << FAB$V_SHRPUT)
  109. #define            FAB$V_SHRGET    1            /* get access */
  110. #define            FAB$M_SHRGET    (1 << FAB$V_SHRGET)
  111. #define            FAB$V_SHRDEL    2            /* delete access */
  112. #define            FAB$M_SHRDEL    (1 << FAB$V_SHRDEL)
  113. #define            FAB$V_SHRUPD    3            /* update access */
  114. #define            FAB$M_SHRUPD    (1 << FAB$V_SHRUPD)
  115. #define            FAB$V_MSE    4            /* multi-stream connects enabled */
  116. #define            FAB$M_MSE    (1 << FAB$V_MSE)
  117. #define            FAB$V_NIL    5            /* no sharing */
  118. #define            FAB$M_NIL    (1 << FAB$V_NIL)
  119. #define            FAB$V_UPI    6            /* user provided interlocking (allows multiple */
  120.                                 /* writers to seq. files) */
  121. #define            FAB$M_UPI    (1 << FAB$V_UPI)
  122.  
  123.        unsigned int    fab$l_ctx;            /* user context */
  124.         char    fab$b_rtv;            /* retrieval window size */
  125.  
  126.        unsigned char    fab$b_org;                /* file organization */
  127. #define            FAB$V_ORG    4            /* file organization */
  128. #define            FAB$S_ORG    4
  129. #define            FAB$C_SEQ    0            /* sequential */
  130. #define            FAB$C_REL    (1 << FAB$V_ORG)    /* relative */
  131. #define            FAB$C_IDX    (2 << FAB$V_ORG)    /* indexed */
  132. #define            FAB$C_HSH    (3 << FAB$V_ORG)    /* hashed */
  133.  
  134.        unsigned char    fab$b_rat;            /* record attributes */
  135. #define            FAB$V_FTN    0        /* FORTRAN carriage control character */
  136. #define            FAB$M_FTN    (1 << FAB$V_FTN)
  137. #define            FAB$V_CR    1        /* line feed - record -carriage return */
  138. #define            FAB$M_CR    (1 << FAB$V_CR)
  139. #define            FAB$V_PRN    2        /* print-file carriage control */
  140. #define            FAB$M_PRN    (1 << FAB$V_PRN)
  141. #define            FAB$V_BLK    3        /* records don't cross block boundaries */
  142. #define            FAB$M_BLK    (1 << FAB$V_BLK)
  143.  
  144.        unsigned char    fab$b_rfm;            /* record format */
  145. #define            FAB$C_RFM_DFLT    2        /* variable length is default */
  146. #define            FAB$C_UDF    0        /* undefined */
  147. #define            FAB$C_FIX    1        /* fixed-length record */
  148. #define            FAB$C_VAR    2        /* variable-length record */
  149. #define            FAB$C_VFC    3        /* variable-length with fixed-length control record */
  150. #define            FAB$C_STM    4        /* RMS-11 stream record (valid only for sequential org) */
  151. #define            FAB$C_STMLF    5        /* stream record delimited by LF (sequential org only) */
  152. #define            FAB$C_STMCR    6        /* stream record delimited by CR (sequential org only) */
  153. #define            FAB$C_MAXRFM    6        /* maximum rfm supported */
  154. #define            FAB$M_RU    1
  155. #define            FAB$M_AI    2
  156. #define            FAB$M_BI    4
  157.  
  158.        unsigned int    fab$l_jnl;            /* lcb address */
  159.         char    *fab$l_xab;            /* XAB address */
  160.     struct    NAM    *fab$l_nam;            /* NAM block address */
  161.         char    *fab$l_fna;            /* file name string address */
  162.         char    *fab$l_dna;            /* default name string address */
  163.        unsigned char    fab$b_fns;            /* file name string size */
  164.        unsigned char    fab$b_dns;            /* default name string size */
  165.        unsigned short    fab$w_mrs;            /* maximum record size */
  166.        unsigned int    fab$l_mrn;            /* maximum record number */
  167.        unsigned short    fab$w_bls;            /* block size for tape */
  168.        unsigned char    fab$b_bks;            /* bucket size */
  169.        unsigned char    fab$b_fsz;            /* fixed header size */
  170.        unsigned int    fab$l_dev;            /* device characteristics */
  171.        unsigned int    fab$l_sdc;            /* spooling device characteristics */
  172.        unsigned short    fab$w_gbc;            /* global buffer count */
  173.  
  174.        unsigned char    fab$b_acmodes;            /* agent access modes */
  175. #define            fab$b_dsbmsk    fab$b_acmodes    /* saved for backwards compatibility */
  176. #define            FAB$S_LNM_MODE    2        /* logical names */
  177. #define            FAB$V_LNM_MODE    0
  178. #define            FAB$S_CHAN_MODE 2        /* channel */
  179. #define            FAB$V_CHAN_MODE 2
  180. #define            FAB$S_FILE_MODE 2        /* files accessability */
  181. #define            FAB$V_FILE_MODE 4
  182.  
  183.        unsigned char    fab$b_rcf;            /* recovery control flags */
  184. # define        FAB$V_RU    0        /* recovery unit recovery */
  185. # define        FAB$V_AI    1        /* after image recovery */
  186. # define        FAB$V_BI    2        /* before image recovery */
  187.  
  188.         unsigned : 32;                /* spare */
  189.         };
  190.  
  191. extern int cc$rms_fab();
  192. #define cc$rms_fab (*(struct FAB *) cc$rms_fab)
  193. /* globalref struct FAB cc$rms_fab;       /* Declare initialized prototype data structure */
  194.